package base.contract

import android.os.Parcel
import android.os.Parcelable
import base.view.ui.BaseDialog
import base.utils.DialogViewHolder

/**
 * @author njmsir
 * Created by njmsir on 2017/9/18.
 */
abstract class DialogConvertListener : Parcelable {
    constructor()
    constructor(parcel: Parcel)

    abstract fun convertView(holer: DialogViewHolder, dialog: BaseDialog)

    override fun writeToParcel(parcel: Parcel, flags: Int) {

    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<DialogConvertListener> {
        override fun createFromParcel(parcel: Parcel): DialogConvertListener {
            return object : DialogConvertListener(parcel) {
                override fun convertView(holer: DialogViewHolder, dialog: BaseDialog) {
                }
            }
        }

        override fun newArray(size: Int): Array<DialogConvertListener?> {
            return arrayOfNulls(size)
        }
    }
}